From: Kenichi Handa Date: Mon, 29 Mar 2004 03:41:39 +0000 (+0000) Subject: (char-displayable-p): Fix generation of XLFD file name. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23438 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d4044133b65973f731c29d91ffef0c78e2d5344b;p=emacs.git (char-displayable-p): Fix generation of XLFD file name. --- diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index b667ec9227a..3a3539359ec 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -384,10 +384,15 @@ basis, this may not be accurate." ;; Now FONT-PATTERN is a string or a cons of family ;; field pattern and registry field pattern. (or (stringp font-pattern) - (setq font-pattern (concat "-" - (or (car font-pattern) "*") - "-*-" - (cdr font-pattern)))) + (let ((family (or (car font-pattern) "*")) + (registry (or (cdr font-pattern) "*"))) + (or (string-match "-" family) + (setq family (concat "*-" family))) + (or (string-match "-" registry) + (setq registry (concat registry "-*"))) + (setq font-pattern + (format "-%s-*-*-*-*-*-*-*-*-*-*-%s" + family registry)))) (x-list-fonts font-pattern 'default (selected-frame) 1))))) (t (let ((coding (terminal-coding-system)))